close all
clear
clc
hours=xlsread('HoursConstruction','H18:H316');
tt=1948:.25:2022.5;
z=4;
xx=(1:length(hours))';XX=[];
for i=z:-1:1
   XX=[XX,xx.^i]; 
end
XX=[XX,ones(length(hours),1)];
p=polyfit((1:length(hours))',hours,z);
yy=XX*p';

figure
plot(tt,hours)
hold on
plot(tt,yy,'--r')
hold off
axis tight

gapFullSample=hours-yy;
gap=gapFullSample(find(tt==1959.25):end);